package com.qiantu.phone.utils;

import com.qiantu.api.entity.SceneDetailBean;

/**
 * @ClassName TempDataHolder
 * @Description TODO
 * @Author ShiJunqiang
 * @Date 2021/12/6 20:53
 * @Version 1.0
 */
public class TempDataHolder {
    public static void setEditSceneDetailBean(SceneDetailBean sceneDetailBean){
        switch (sceneDetailBean.getSceneType()){
            case 1:
                DataHolder.getInstance().setData("editSceneDetail", sceneDetailBean);
                break;
            case 3:
                DataHolder.getInstance().setData("editSceneIntentDetail", sceneDetailBean);
                break;
            case 4:
                DataHolder.getInstance().setData("editScenePrivateDetail", sceneDetailBean);
                break;
        }
    }

    public static SceneDetailBean getEditSceneDetailBean(int type){
        switch (type){
            case 1:
                return (SceneDetailBean) DataHolder.getInstance().getData("editSceneDetail");
            case 3:
                return (SceneDetailBean) DataHolder.getInstance().getData("editSceneIntentDetail");
            case 4:
                return (SceneDetailBean) DataHolder.getInstance().getData("editScenePrivateDetail");
        }
        return null;
    }

    public static void clearEditSceneDetailBean(int type){
        switch (type){
            case 1:
                DataHolder.getInstance().clearData("editSceneDetail");
            case 3:
                DataHolder.getInstance().clearData("editSceneIntentDetail");
            case 4:
                DataHolder.getInstance().clearData("editScenePrivateDetail");
        }
    }
}
